package thread;

import java.util.Scanner;

public class TreadPriorityDemo02 {
    static int count;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        count = scanner.nextInt();
        new Thread(()-> {

                while (true){

                    if (count==0){
                        System.out.println("时间到");
                        break;
                    }

                    System.out.println(count--);

                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
        }).start();

    }
}
